Florian Müllner [Mon, 2 Mar 2015 11:14:54 +0000 (12:14 +0100)]
system: Switch between alternatives on long-press
On systems that support both shutdown and suspend, the latter operation
is currently only accessible via pressing the Alt key. As using the
keyboard may be inconvenient or simply not possible (e.g. on touch),
allow switching between alternatives via long-press as well.
Florian Müllner [Wed, 4 Mar 2015 18:01:32 +0000 (19:01 +0100)]
appFavorites: Only use renamed ID if it can be resolved
We currently assume that if a .desktop file has been renamed (that
is, it is in our rename list), the updated ID will be used. That
assumption was mostly sound when the list contained only GNOME apps
following the same release cycle as gnome-shell, but as applications
with less ties to the GNOME schedule adopt the reverse DNS notation,
it becomes more likely for apps to appear in the list before actually
being updated on the system. Handle this case by only renaming IDs
for which the replacement can be resolved to an existing application.
Florian Müllner [Wed, 15 Feb 2017 10:47:45 +0000 (11:47 +0100)]
location: Initialize permissions
The permissions hash is initialized after consulting the permission
store, however the lookup is skipped for requests that cannot be
resolved to an application, resulting in an error when accessing
the uninitialized hash for saving. Just make sure that the property
is always initialized to avoid that error.
Florian Müllner [Tue, 14 Feb 2017 17:24:50 +0000 (18:24 +0100)]
Don't mix GJS and GObject signal systems
GJS implements a basic signal system that allows monkey-patching
JS objects with signal methods resembling the GObject ones. However
it's clearly not a good idea to replace the actual GObject methods,
so use the proper GObject facilities when inheriting from GObject.
Benjamin Berg [Mon, 13 Feb 2017 13:52:23 +0000 (14:52 +0100)]
network: Ensure the connection list is sorted after rename
Items were inserted correctly but the synchronisation was lost if the
name of a connection was changed. Simply making sure the position is
correct after a connection is updated fixes the issue.
Reported-by: Oliver Haessler <ohaessle@redhat.com>
https://bugzilla.gnome.org/show_bug.cgi?id=778686
Jonas Ådahl [Mon, 28 Nov 2016 04:54:38 +0000 (12:54 +0800)]
Use the versioned libmutter*.so versions
Mutter now provides versioned libraries and pkg-config files, meaning
an application using libmutter and friends need to depend on a specific
version of the API.
Bastien Nocera [Fri, 10 Feb 2017 20:08:01 +0000 (21:08 +0100)]
portalHelper: Add security icon to titlebar
This adds a security icon (either secure or insecure) to the portal
helper's title bar. As soon as a part or all of the page and its content
is served insecurely, the icon shown will be a broken padlock.
Philip Chimento [Fri, 10 Feb 2017 02:11:28 +0000 (18:11 -0800)]
ibusManager: Use const correctly
Per ES6, a variable declared const should only be valid inside its lexical
scope. Previously, GJS would accept this code, but that will change in the
SpiderMonkey JS engine in the next release of GJS.
Alan Coopersmith [Sat, 24 Sep 2016 18:06:00 +0000 (11:06 -0700)]
Use /proc/self/cmdline on Solaris as well in shell_global_reexec_self()
Solaris 11.3.5 and later have a Linux-compatible implementation of
/proc/self/cmdline, so the code to use it can be enabled in gnome-shell
on Solaris - if used on an older OS, it simply fails to open the file
and returns without doing anything, just as the code did before enabling
this.
https://bugzilla.gnome.org/show_bug.cgi?id=776199
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Florian Müllner [Tue, 7 Feb 2017 19:22:18 +0000 (20:22 +0100)]
widget: Only include visible actors in focus chain
It isn't useful to move the keyboard focus to a hidden actor, so
only include visible actors in the focus chain - this is in fact
the documented behavior of st_widget_get_focus_chain(), so having
the default implementation return all children has always been
unexpected.
Rui Matos [Wed, 1 Feb 2017 18:01:47 +0000 (19:01 +0100)]
Make all our window clones use the MetaWindowActor as source
Using a MetaWindowActor's shaped texture as the source for window
clones means that if there are further MetaSurfaceActor children
(e.g. a wayland client using sub-surfaces) they don't get cloned.
This obviously wasn't an issue until wayland clients introduced the
possibility of having multiple MetaSurfaceActors under a
MetaWindowActor but there's no fundamental reason we can't clone the
toplevel actor.
WorkspaceThumbnail.WindowClone is the one class that was already using
the MetaWindowActor instead of the texture although it seems to have
been an unintended change in commit 8b99617513da1713ff88ca4abf54e6125405d31c.
Carlos Garnacho [Wed, 25 Jan 2017 16:47:18 +0000 (17:47 +0100)]
windowManager: Avoid reentrancy on the ::size-changed handler
We have no guarantees on the number of ::size-changed signals that we may
receive, so the _sizeChangedWindow handler may run multiple times, which
leads to multiple calls to meta_plugin_size_change_completed(). So double
check the actor is not already being animated in the _sizeChangedWindow
handler to avoid reentrancy.
Bastien Nocera [Mon, 23 Jan 2017 07:32:30 +0000 (08:32 +0100)]
portalHelper: Don't change the main window title
The title of the window should not be in control of a potentially
hostile hotspot provider, so only set the subtitle to be that of the
page, the main title will stay the same.
The subtitle will also be set to a URI, so that the hotspot cannot be
used to control the title shown in our UI.
Bastien Nocera [Mon, 23 Jan 2017 07:32:05 +0000 (08:32 +0100)]
portalHelper: Set a minimum window size
Even though the window is maximised when created, the window is still
resizable. This avoids making the window smaller than usable. If the
screen is smaller than the minimum window size, the maximise should make
it fullscreen and non-resizable.
This fixes the shell not picking updates to the contents of the underlying
.desktop files for application launchers, or when a .desktop file is
overriden by a user-installed one under ~/.local/share/applications
network: Avoid JS error when activating VPN connection
If the call to settings.get_connection_by_path in
ensureActiveConnectionProps returns null, we'll hit a JS error here.
Seems to happen always when activating a VPN connection. Avoid that.
Giovanni says:
"I believe this is papering over an existing bug, but it's possible for
settings.get_connection_by_path() to legitimately return null (if the
connection is owned by a different user and invisible to the current
one), so the fix is correct anyway."
Jonas Ådahl [Thu, 15 Dec 2016 11:34:10 +0000 (19:34 +0800)]
gtk-embed: Don't try to compare with unrealized window
After having embedded a Gtk window, we start to listen for the
corresponding MetaWindow to know when it has been mapped by the
compositor. If the embedder does not realize the window immediately,
and some other window is created and mapped before the embedder
realizes the window, we would prior to this patch try to dereference
the not created GdkWindow. Fix this by NULL checking the GdkWindow
before dereferencing. We will never miss the needed MetaWindow creation
since it can not have been mapped have it not yet been realized.
Philip Chimento [Tue, 6 Dec 2016 01:31:08 +0000 (17:31 -0800)]
main: Destroy GjsContext before exit
This will be required in the upcoming version of GJS.
The reference count on ShellGlobal is 2 at this point, because JS holds a
reference due to the "window.global = Shell.Global.get()" line in
ui/environment.js. Therefore, destroy the GjsContext first, then unref
the ShellGlobal object.
Cleaning up ShellGlobal was previously only enabled behind a debug
environment variable, but it should be required now.
Florian Müllner [Sat, 26 Nov 2016 18:32:22 +0000 (19:32 +0100)]
notificationDaemon: Keep source alive when replacing notification
When a GNotification has the same ID as a previous one, it should
be shown as a new notification after withdrawing the old one.
However for this to work, we must not destroy the corresponding
source if withdrawing the old notification lets the notification
count drop to zero, so make sure the source is kept alive until
the replace operation has completed.
Carlos Garnacho [Sat, 26 Nov 2016 13:59:48 +0000 (14:59 +0100)]
NotificationDaemon: create the application proxy asynchronously
Clicking on calendar notifications might block till the DBus request times
out if the application being poked happens to be non-responsive. Perform
this asynchronously so we don't block if that is the case.
Xiaoguang Wang [Fri, 18 Nov 2016 08:00:01 +0000 (16:00 +0800)]
appDisplay: Fix completion handler for empty animations
If an onComplete handler is passed to animate(), it is set to run at
the end of the animation via the icon grid's ::animation-done signal.
Currently the signal is connected after starting the animation, with
the result that the handler doesn't run when the animation completes
immediately (because there are no icons to animate). Fix this by only
starting the animation after connecting the signal.
Florian Müllner [Thu, 17 Nov 2016 15:24:44 +0000 (16:24 +0100)]
appDisplay: Use correct view for animation
We currently assume that the current view matches the 'app-picker-view'
setting. While that is usually the case, there is one notable exception:
While there isn't sufficient usage data (yet), we show all applications
instead of an empty frequent view regardless of the setting. We should
animate the actually visible icons in that case, not the (non-existent)
ones from the hidden frequent view.
Debarshi Ray [Mon, 24 Oct 2016 13:20:26 +0000 (15:20 +0200)]
portalHelper: Address intermittent TLS failures
Users are currently experiencing intermittent (and hard to debug) TLS
errors when loading the portal authentication page. This could be
caused by using http://www.gnome.org/ for our connectivity checks
because it redirects to HTTPS.
We can completely remove TLS from the equation by not using HTTPS.
http://nmcheck.gnome.org/ is a good choice because it doesn't redirect
to HTTPS and was created for NetworkManager's connectivity check.
Rui Matos [Wed, 23 Nov 2016 14:35:03 +0000 (15:35 +0100)]
windowManager: Handle fullscreening from zero sized windows
Wayland clients can request their surfaces to be fullscreened before
commiting a buffer which means that we need to handle fullscreen
requests for which the old size is 0x0, preferably without warnings.
Since the mapping animation also runs for these windows, we can simply
bail out and ignore the fullscreen size change.
windowManager: Fix fullscreen animations of wayland clients
Wayland clients are in control of their window size so the existing
mutter plugin API, which assumes size changes are synchronous, doesn't
work for them since when our size-change handler runs the MetaWindow's
size isn't final yet.
To fix this, the mutter plugin API was extended with a size-changed
vfunc that lets us know when the MetaWindow size has actually
changed. This way we can make the window snapshot and get the old
window size on the existing size-change handler and later, on the new
size-changed handler, get the new size and start the animation.
Florian Müllner [Tue, 22 Nov 2016 17:12:35 +0000 (18:12 +0100)]
texture-cache: Warn when loading sliced image fails
Sliced images are loaded into a group actor with one child actor
per slice. In case loading the image fails, we currently quietly
return the empty group actor, which makes diagnosing problems
unnecessarily hard - just be a bit more verbose on failure.
Florian Müllner [Mon, 21 Nov 2016 17:09:42 +0000 (18:09 +0100)]
animations: Guard against empty animations
Our animation code not only relies on the animation being loaded
(which we handle), but also on having at least one frame - otherwise
the computation of the next frame index will turn up NaN through
division by zero. Guard against this case by treating empty animations
as not loaded.